<?php


namespace app\controllers;

use yii\helpers\Json;
use app\service\SysRoleMenuService;
use app\service\SysRoleService;

class RoleDeleteController extends BaseJsonController
{
    public function doService($req, $userInfo)
    {
        $post = @file_get_contents('php://input');
        $idList = Json::decode($post);

        $rService = new SysRoleService();
        $rService->deleteBatch($idList);
        $service = new SysRoleMenuService();
        return  $service->deleteBatch($idList);

    }


    protected function permissionName()
    {
        return "sys/role/delete";
    }

}